import 'package:distribution_mall_flutter/generated/json/base/json_field.dart';
import 'package:distribution_mall_flutter/generated/json/merchant_auth_last_entity.g.dart';
import 'dart:convert';
export 'package:distribution_mall_flutter/generated/json/merchant_auth_last_entity.g.dart';

@JsonSerializable()
class MerchantAuthLastBody {
  String? certificateId = '';
  String? distributorId = '';
  int? applyTime = 0;
  String? auditState = '';
  String? rejectReason = '';
  int? auditTime = 0;
  String? certificateType = '';
  String? businessName = '';
  String? certificateNo = '';
  String? businessPermitUrl = '';
  MerchantAuthAddress? address;
  MerchantAuthLastBodyPhoneNumber? phoneNumber;

  MerchantAuthLastBody();

  factory MerchantAuthLastBody.fromJson(Map<String, dynamic> json) =>
      $MerchantAuthLastBodyFromJson(json);

  Map<String, dynamic> toJson() => $MerchantAuthLastBodyToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class MerchantAuthLastBodyPhoneNumber {
  int? countryCode = 0;
  int? callingNumber = 0;

  MerchantAuthLastBodyPhoneNumber();

  factory MerchantAuthLastBodyPhoneNumber.fromJson(Map<String, dynamic> json) =>
      $MerchantAuthLastBodyPhoneNumberFromJson(json);

  Map<String, dynamic> toJson() => $MerchantAuthLastBodyPhoneNumberToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class MerchantAuthAddress {
  late String city;
  late String country;
  late String detailed;
  late String district;
  late String province;
  late String street;

  MerchantAuthAddress();

  factory MerchantAuthAddress.fromJson(Map<String, dynamic> json) =>
      $MerchantAuthAddressFromJson(json);

  Map<String, dynamic> toJson() => $MerchantAuthAddressToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
